import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import '../assets/global.css'

Vue.use(VueRouter)

const routes = [
  {
    path: '/login',
    name: 'Login',
    component: () => import('../views/login/index')
  },
  {
    path: '/',
    // component: Home,
    component: Home,
    children:[
      {
        path:"/basicInfo",
        name:"basicInfo",
        component: () => import("../views/basicInfo/index.vue")
      },
      // 日历
      {
        path:'/calendar',
        name:'calendar',
        component: () => import("../views/calendar/index.vue")
      },
      {
        path:'/weightInfo',
        name:'weightInfo',
        component: () => import("../views/weightInfo/index.vue")
      },
      {
        path:'/serviceRating',
        name:'serviceRating',
        component: () => import("../views/serviceRating/index.vue")
      },
      {
        path:'/test',
        name:'test',
        component: () => import("../views/test/index.vue")
      },
      {
        path:'/fileInfo',
        name:'fileInfo',
        component: () => import("../views/fileInfo/index.vue")
      },
      //日程计划表
      {
        path:'/schedulePlan',
        name:'schedulePlan',
        component: () => import("../views/schedulePlan/index2.vue")
      },
    ],
  },
  {
    path: '/home',
    name: 'Home',
    redirect: Home
  }
]

const router = new VueRouter({
  routes
})

export default router
